/* 莫兰迪色系 */
:root {
  --primary-color: #a0b8cd;
  --secondary-color: #e8d0d0;
  --accent-color: #d8ae89;
  --light-color: #f5f5f5;
  --dark-color: #3c4651;
  --success-color: #c3dab7;
  --warning-color: #f2d5a0;
  --danger-color: #e6b7b0;
  --grey-light: #e8e8e8;
  --grey-medium: #b3b3b3;
  --grey-dark: #686868;
  --shadow-color: rgba(60, 70, 81, 0.1);

  --light-pressure: #d1e1c7;
  --medium-pressure: #f5e2b3;
  --high-pressure: #efc7bd;

  --font-primary: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --transition-standard: all 0.3s ease;
  --border-radius: 16px;
  --card-shadow: 0 4px 20px var(--shadow-color);
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

/* 容器布局 */
.app-container {
  max-width: 100%;
  min-height: 100vh;
  position: relative;
  padding-bottom: 70px; /* 为底部导航腾出空间 */
}

/* 顶部状态栏 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
  background-color: white;
  border-bottom: 1px solid var(--grey-light);
}

.pressure-index h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-dark);
  margin-bottom: 8px;
}

.pressure-meter {
  width: 120px;
  height: 8px;
  background-color: var(--grey-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.pressure-level {
  height: 100%;
  width: 50%;
  background: linear-gradient(
    to right,
    var(--light-pressure),
    var(--medium-pressure),
    var(--high-pressure)
  );
  border-radius: 4px;
  transition: width 0.5s ease;
}

#pressureValue {
  font-size: 12px;
  color: var(--grey-dark);
}

.user-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

/* 主内容区 */
.main-content {
  padding: 16px;
}

/* 欢迎区域 */
.welcome-section {
  margin-bottom: 24px;
}

.welcome-section h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.welcome-section p {
  color: var(--grey-dark);
  font-size: 16px;
}

/* 卡片样式 */
.assessment-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: var(--transition-standard);
}

.assessment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--shadow-color);
}

.card-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-content p {
  color: var(--grey-dark);
  font-size: 14px;
  margin-bottom: 12px;
}

.assessment-progress {
  font-size: 12px;
  color: var(--grey-medium);
}

/* 按钮样式 */
.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-standard);
}

.primary-btn:hover {
  background-color: #8ba7bc;
  transform: scale(1.05);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-standard);
}

.secondary-btn:hover {
  background-color: rgba(160, 184, 205, 0.1);
}

/* 游戏区域 */
.games-section {
  margin-bottom: 24px;
}

.games-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.game-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition-standard);
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px var(--shadow-color);
}

.game-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  background-color: var(--grey-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-icon img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.game-icon.coming-soon {
  opacity: 0.6;
}

.game-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.game-card p {
  color: var(--grey-dark);
  font-size: 12px;
}

/* 音效区域 */
.asmr-section {
  margin-bottom: 24px;
}

.asmr-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.asmr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.asmr-card {
  background-color: white;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition-standard);
  cursor: pointer;
  position: relative;
}

.asmr-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--shadow-color);
}

.asmr-card.active {
  border: 2px solid var(--primary-color);
}

.asmr-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 10px;
  overflow: hidden;
}

.asmr-card h3 {
  font-size: 14px;
  font-weight: 600;
}

.premium-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--accent-color);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

.audio-controls {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: var(--card-shadow);
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 16px;
  transition: var(--transition-standard);
}

.control-btn:hover {
  background-color: #8ba7bc;
}

#volumeSlider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--grey-light);
  outline: none;
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

/* 数据看板 */
.data-insights {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.data-insights h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.insights-preview {
  height: 180px;
  margin-bottom: 16px;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px var(--shadow-color);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 25%;
  height: 100%;
  cursor: pointer;
  transition: var(--transition-standard);
  color: var(--grey-medium);
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active svg {
  stroke: var(--primary-color);
}

.nav-item:not(.active) svg {
  stroke: var(--grey-medium);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s;
}

.nav-text {
  font-size: 12px;
  font-weight: 500;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 90%;
  max-width: 480px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modal-in 0.3s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--grey-light);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  font-size: 24px;
  color: var(--grey-dark);
  cursor: pointer;
  transition: var(--transition-standard);
}

.close-btn:hover {
  color: var(--dark-color);
}

.modal-body {
  padding: 20px;
}

/* 评估问题样式 */
.question-progress {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background-color: var(--grey-light);
  border-radius: 3px;
  overflow: hidden;
  margin-right: 10px;
}

.progress-fill {
  height: 100%;
  width: 10%;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

#questionCounter {
  font-size: 14px;
  color: var(--grey-dark);
}

.question {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.6;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  background-color: white;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-standard);
}

.option-btn:hover {
  background-color: var(--grey-light);
}

.option-btn.selected {
  border-color: var(--primary-color);
  background-color: rgba(160, 184, 205, 0.1);
}

/* 结果样式 */
.results-container {
  text-align: center;
}

.result-header {
  margin-bottom: 20px;
}

.result-score {
  margin-bottom: 30px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
  font-weight: 700;
}

.result-suggestions {
  text-align: left;
  margin-bottom: 30px;
}

.result-suggestions h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.result-suggestions ul {
  list-style-type: none;
}

.result-suggestions li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.result-suggestions li::before {
  content: "•";
  position: absolute;
  left: 10px;
  color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .asmr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
